-- GENERATED SPELL FOR [Redpath the Corrupted] --


function spell0_10938(pUnit, Event) --@Backhand,n/a--
pUnit:FullCastSpellOnTarget(6253,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10938', 2333, 1)
end

function spell1_10938(pUnit, Event) --@Demoralizing Shout,Self--
pUnit:FullCastSpellOnTarget(16244,pUnit)
pUnit:RegisterEvent('Sorts_10938', 30264, 1)
end

function spell2_10938(pUnit, Event) --@Fear,n/a--
pUnit:FullCastSpellOnTarget(12542,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10938', 5500, 1)
end

function spell3_10938(pUnit, Event) --@Strike,n/a--
pUnit:FullCastSpellOnTarget(15580,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10938', 528, 1)
end

function Sorts_10938(pUnit, Event)
local choix_sorts_10938 = math.random(0, 3)
if choix_sorts_10938 == 0 then
pUnit:RegisterEvent('spell0_10938', 1, 1)
end
if choix_sorts_10938 == 1 then
pUnit:RegisterEvent('spell1_10938', 1, 1)
end
if choix_sorts_10938 == 2 then
pUnit:RegisterEvent('spell2_10938', 1, 1)
end
if choix_sorts_10938 == 3 then
pUnit:RegisterEvent('spell3_10938', 1, 1)
end
end

function mob10938_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_10938', math.random(1500, 3000), 1)
end

function mob10938_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10938_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10938_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(10938, 1, 'mob10938_Action')
RegisterUnitEvent(10938, 2, 'mob10938_Leave')
RegisterUnitEvent(10938, 3, 'mob10938_Kill')
RegisterUnitEvent(10938, 4, 'mob10938_Die')
